package gopl

import (
	"bufio"
	"fmt"
	"os"
)

func Dup1() {
	counts := make(map[string]int)
	input := bufio.NewScanner(os.Stdin)
	for input.Scan() { //input filter the \n
		s := input.Text()
		if s == "" {
			break
		}
		counts[s]++
	}
	for line, c := range counts {
		fmt.Printf("%d\t%s\n", c, line)
	}
}
